package com.hopedove.yieldmanage

import com.hopedove.data.Datetime
import com.hopedove.utils.DateTimeUtil
import org.junit.Assert.assertEquals
import org.junit.Test

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    @Test
    fun datetime_specialAdjust() {
        val d = Datetime(2021, 3, 3, 7, 25, 0)
        val datetime = DateTimeUtil.adjustForSpecialShift(d)

        assertEquals(2, datetime.dayOfMonth())
    }
}